[Top] [Prev] [Next] [Bottom] [Contents]

Scripts used by Sapphire/Web

There are several scripts that Sapphire/Web executes while you build your projects. These scripts allow you to integrate any HTML browser and HTML editor into the tool. They also allow you to help enforce a development process that your organization uses when building code. These scripts can be found in $SAPPHIRE/bin. Make sure it is in your path.

If you want to change how these scripts work, we recommend that you copy the script to another directory and make changes. Make sure that you copy the script to a directory that appears in your PATH before $SAPPHIRE/bin. When Sapphire/Web executes a script it does not look in $SAPPHIRE/bin to get the scripts, it assumes the script is in your path. See the description of saweb.sh for more information on setting the path.

This script will bring up your HTML browser. It is called to bring up your Startup HTML Document when the test button is pressed, and also used when viewing Sapphire/Web's on-line help and previewing an HTML file from the Object Bind Editor or Document Manager. The script delivered with the tool assumes your browser is Netscape 1.1N (or later) and that the Netscape executable is in your path.

In order to speed up sending HTML documents to the browser and to avoid having many browsers on your screen at the same time, the script uses Netscape's remote control feature. Netscape's remote control will allow you to use the same browser window every time you call the sabrowser.sh scripts.

saedithtml.sh

This script is called when you press the Edit HTML button in the Document Manager. Its purpose is to launch your HTML editor. The script delivered with the tool launches vi in an xterm.

samake.sh

This script is called whenever you compile and link your Server Application executable. The Build Project, Rebuild All and Test buttons in the Project Window cause this script to be executed. The script delivered with the tool removes all object files in the project directory (on a rebuild) then calls make -f with the name of the Makefile for the project.

sareadhtml.sh

This script is called before an HTML file is read into Sapphire/Web. Its purpose is to allow you to do source code control of the files in a project. You may want to call a program like rcs to check out the file before it gets read into the tool. The script delivered with the tool does nothing. This script will be called only if the option Project.Call Read/Write Scripts is set to True.

sareadmodule.sh

This script is called before a module file is read into Sapphire/Web. The script allows you to do source code control of the files in a project. You may want to call a program like rcs to check out the file before it gets read into the tool. The script delivered with the tool does nothing.This script will be called only if the option Project.Call Read/Write Scripts is set to True.

sareadprj.sh

This script is called before the project file, main module file and Makefile are read into Sapphire/Web. The script allows you to do source code control of the files in a project. You may want to call a program like rcs to check out the files before it gets read into the tool. The script delivered with the tool does nothing.This script will be called only if the option Project.Call Read/Write Scripts is set to True.

sarel1.sh

This script is called when a user presses the release button in the project window. It is called before the code is generated in the release directory. The default action of this script is to copy all of the .c, .h, and any files ending in the file extension specified in the option Makefile.$SA_SOURCE_SUFFIX to the release directory. Note that after the this script completes, the tool generates the code for the project and then calls sarel2.sh.

sarel2.sh

This script is called when a user presses the release button in the project window after the code is generated in the release directory. The default action of this script is to call samake.sh. This script is supplied so you can add hooks to your configuration management system when releasing a project.

satest.sh

This script is called when you press the test button in Sapphire/Web and allows you to change the method by which you test your project. The script delivered with the tool calls samake.sh, tries to create directories, copies the Server Application executable to the directory specified in the Test.CGI Path option, copies the HTML files to the directory specified in the Test.HTML Path option, and calls sabrowser.sh with the Test.HTML URL and Project.Startup HTML Document options.

This script uses the UNIX command rcp to copy the files to the machine that the http server runs on. You will have problems with this script as delivered if you do not have the same user name on the machine that the http server runs on. You can get around this problem by going to the Edit | Options | Test | HTML Path and inserting the user name before the server name in the HTML Path string.

saweb.sh

This script is not called by the tool but is provided so the user can bring up Sapphire/Web. This makes sure the SAPPHIRE and NLSPATH environment variables are set, puts $SAPPHIRE/bin at the beginning of your PATH and then launches Sapphire/Web. Note that if you use this script as delivered, you will always use the scripts located in $SAPPHIRE/bin because that directory is the first one in your path.

sawritehtml.sh

This script is called after an HTML file is written from Sapphire/Web. Its purpose is to allow you to do source code control of the files in a project. You may want to call a program like rcs to check the file after it gets written from the tool. The script delivered with the tool does nothing. This script will be called only if the option Project.Call Read/Write Scripts is set to True.

sawritemodule.sh

This script is called after a module file is written from Sapphire/Web. The purpose of this script is to allow you to do source code control of the files in a project. You may want to call a program like rcs to check the file after it gets written from the tool. The script delivered with the tool does nothing. This script will be called only if the option Project.Call Read/Write Scripts is set to True.

sawriteprj.sh

This script is called after the project file, main module file and Makefile are written from Sapphire/Web and allows you to do source code control of the files in a project. You may want to call a program like rcs to check the file after it gets written from the tool. The script delivered with the tool does nothing. This script will be called only if the option Project.Call Read/Write Scripts is set to True.



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.